﻿using System;
using System.Windows.Controls;
using TheOliver.DigitalSignage.Client.Interfaces;

namespace CeBIT2010
{
    public partial class CebitCurrentSession : UserControl, ISlide
    {
        public CebitCurrentSession()
        {
            InitializeComponent();
            this.Loaded += (s, e) =>
            {
                this.DataContext = Configuration.CurrentSession;
            };
        }

        #region ISlide Members

        public event EventHandler Finished;

        public int DisplayDuration
        {
            get { return Configuration.DefaultDisplayDuration; }
        }

        public bool HasContent
        {
            get 
            { 
                return Configuration.CurrentSession != null; 
            }
        }

        #endregion
    }
}
